package com.example.shuiyin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @deprecated 此类已被 {@link Task} 替代，请使用Task类避免与同一表的冲突
 */
@Deprecated
@Data
@TableName("tasks")  // 映射到tasks表而非watermark_task表
public class WatermarkTask {
    @TableId(type = IdType.AUTO)
    private Long id;
    
    @TableField("task_id")
    private String taskId;
    
    @TableField("user_id")
    private Long userId;
    
    // 下面这些字段将存储在parameters JSON字段中
    @TableField(exist = false)
    private String sourceFileId;
    
    @TableField(exist = false)
    private String sourceFilePath;
    
    @TableField(exist = false)
    private String sourceFileName;
    
    @TableField(exist = false)
    private Long sourceFileSize;
    
    @TableField("type")
    private String processType;
    
    private String status;
    
    // 使用processed_items/total_items来表示进度
    @TableField(exist = false)
    private Integer progress;
    
    @TableField("total_items")
    private Integer totalItems;
    
    @TableField("processed_items")
    private Integer processedItems;
    
    @TableField("success_items")
    private Integer successItems;
    
    @TableField("failed_items")
    private Integer failedItems;
    
    @TableField("result_url")
    private String resultFilePath;
    
    @TableField("error_message")
    private String errorMessage;
    
    @TableField("parameters")
    private String params;
    
    @TableField("start_time")
    private LocalDateTime startTime;
    
    @TableField("end_time")
    private LocalDateTime endTime;
    
    @TableField("created_at")
    private LocalDateTime createdAt;
    
    @TableField("updated_at")
    private LocalDateTime updatedAt;
} 